package org.maggioni.springsandbox.springhandlers;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

public class DisplayNameBeanFactoryPostProcessor implements BeanFactoryPostProcessor {

	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
			throws BeansException {
		System.out.println("Bean list:");
		for ( String beanName : beanFactory.getBeanDefinitionNames() ) {
			System.out.println("Bean name: "+beanName);
		}
		System.out.println("----------");
	}

}
